﻿using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Design;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace EFCoreBooks;

public class StoreDbContextDesignFactory : IDesignTimeDbContextFactory<StoreDbContext>
{
    public StoreDbContext CreateDbContext(string[] args)
    {
        var builder = new DbContextOptionsBuilder<StoreDbContext>();
        builder.UseSqlServer("Server=81.69.10.164;Database=Book;User=sa;Password=99@99.com;TrustServerCertificate=True;");
        var context = new StoreDbContext(builder.Options);
        return context;
    }

}
